//---------------------------------------------------------------------------

#ifndef TFlylinkDiscoverH
#define TFlylinkDiscoverH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <Db.hpp>
#include <DBGrids.hpp>
#include <Grids.hpp>
#include "dxCntner.hpp"
#include "dxDBCtrl.hpp"
#include "dxDBGrid.hpp"
#include "dxTL.hpp"
#include <ComCtrls.hpp>
#include <ToolWin.hpp>
#include <ImgList.hpp>
#include "sqlite3x.hpp"
#include "vvRxMemDS.hpp"
#include <ExtCtrls.hpp>
using namespace sqlite3x;
//---------------------------------------------------------------------------
class TFlylinkDiscover : public TForm
{
__published:	// IDE-managed Components
        TDataSource *m_DataSource;
        TPageControl *m_MainPageControl;
        TTabSheet *m_v_ratioTabSheet;
        TdxDBGrid *m_fly_ratio_DBGrid;
        TdxDBGridMaskColumn *m_fly_ratio_DBGridid;
        TdxDBGridMaskColumn *m_fly_ratio_DBGridupload;
        TdxDBGridMaskColumn *m_fly_ratio_DBGriddownload;
        TdxDBGridMaskColumn *m_fly_ratio_DBGriduserip;
        TdxDBGridMaskColumn *m_fly_ratio_DBGridnick;
        TdxDBGridMaskColumn *m_fly_ratio_DBGridhub;
        TTabSheet *m_dupTabSheet;
        TDataSource *m_DupDSource;
        TdxDBGrid *m_DupDBGrid;
        TdxDBGridMaskColumn *m_DupDBGridcnt_dup;
        TdxDBGridMaskColumn *m_DupDBGridpath_1;
        TdxDBGridMaskColumn *m_DupDBGridpath_2;
        TdxDBGridMaskColumn *m_DupDBGridname_max;
        TdxDBGridMaskColumn *m_DupDBGridname_min;
        TToolBar *m_ToolBar;
        TToolButton *m_ExportToolButton;
        TToolButton *ToolButton2;
        TImageList *m_ImageList;
        TvvRxMemoryData *m_RatioMemoryData;
        TIntegerField *m_RatioMemoryDataID;
        TFloatField *m_RatioMemoryDataupload;
        TFloatField *m_RatioMemoryDatadownload;
        TvvRxMemoryData *m_DupMemoryData;
        TIntegerField *m_DupMemoryDatatth_id;
        TIntegerField *m_DupMemoryDatacnt_dup;
        TStringField *m_DupMemoryDatapath_1;
        TStringField *m_DupMemoryDatapath_2;
        TStringField *m_DupMemoryDataname_max;
        TStringField *m_DupMemoryDataname_min;
        TStringField *m_RatioMemoryDatauserip;
        TStringField *m_RatioMemoryDatanick;
        TStringField *m_RatioMemoryDatahub;
   TPanel *m_FilterPanel;
   TCheckBox *m_ShowAllIP;
   TTabSheet *m_ShareTabSheet;
   TdxDBGrid *m_ShareDBGrid;
   TDataSource *m_ShareDataSource;
   TvvRxMemoryData *m_ShareMemoryData;
   TIntegerField *m_ShareMemoryDatarowid;
   TStringField *m_ShareMemoryDatapath_name;
   TStringField *m_ShareMemoryDatafile_name;
   TFloatField *m_ShareMemoryDatasize;
   TFloatField *m_ShareMemoryDatastamp;
   TIntegerField *m_ShareMemoryDatahit;
   TFloatField *m_ShareMemoryDatastamp_share;
   TIntegerField *m_ShareMemoryDatabitrate;
   TIntegerField *m_ShareMemoryDataftype;
   TdxDBGridMaskColumn *m_ShareDBGridrowid;
   TdxDBGridMaskColumn *m_ShareDBGridpath_name;
   TdxDBGridMaskColumn *m_ShareDBGridfile_name;
   TdxDBGridMaskColumn *m_ShareDBGridsize;
   TdxDBGridMaskColumn *m_ShareDBGridstamp;
   TdxDBGridMaskColumn *m_ShareDBGridhit;
   TdxDBGridMaskColumn *m_ShareDBGridstamp_share;
   TdxDBGridMaskColumn *m_ShareDBGridbitrate;
   TdxDBGridMaskColumn *m_ShareDBGridftype;
        TTabSheet *m_LogTabSheet;
        TPanel *m_LogFilterPanel;
        TdxDBGrid *m_LogsDBGrid;
        TButton *m_SearchButton;
        TDataSource *m_LogsDataSource;
        TvvRxMemoryData *m_LogsData;
        TStringField *m_LogsDataFileName;
        TIntegerField *m_LogsDataID;
        TStringField *m_LogsDatasdate;
        TdxDBGridMaskColumn *m_LogsDBGridsdate;
        TComboBox *m_LimitBox;
        TLabel *Label1;
        TStringField *m_LogsDatabody;
        TStringField *m_LogsDatanick;
        TdxDBGridMaskColumn *m_LogsDBGridnick;
        TdxDBGridMaskColumn *m_LogsDBGridID;
        TdxDBGridMaskColumn *m_LogsDBGridfile;
        TdxDBGridMaskColumn *m_LogsDBGridbody;
        void __fastcall m_ExportToolButtonClick(TObject *Sender);
        void __fastcall m_fly_ratio_DBGridCustomDrawCell(TObject *Sender,
          TCanvas *ACanvas, TRect &ARect, TdxTreeListNode *ANode,
          TdxTreeListColumn *AColumn, bool ASelected, bool AFocused,
          bool ANewItemRow, AnsiString &AText, TColor &AColor,
          TFont *AFont, TAlignment &AAlignment, bool &ADone);
   void __fastcall m_MainPageControlChange(TObject *Sender);
   void __fastcall m_ShowAllIPClick(TObject *Sender);
        void __fastcall m_SearchButtonClick(TObject *Sender);
private:	// User declarations
	sqlite3_connection m_flySQLiteDB;
	sqlite3_connection m_flySQLiteDB_Log;
public:		// User declarations
        __fastcall TFlylinkDiscover(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TFlylinkDiscover *FlylinkDiscover;
#endif
